package com.google.code.cakedroid.base;

import java.util.List;
import java.util.Map;

/**
 * Base Web Data Parse 
 * @author androidyue
 * Last Modified:2011-12-15
 */
public abstract  class BaseDataParser implements ParseInterface{
	protected Map<String,String> subResult;
	protected List<Map<String,String>> fullResult;
	protected final int defaultOffset=0;
	
	@Override
	public  List<Map<String,String>> getFullResult() {
		return this.fullResult;
	}
	
	@Override
	public Map<String,String> getSubResult(int offset) {
		int resultSize=this.fullResult.size();
		if(0==resultSize){
			return null;
		}
		if(offset>=resultSize){
			offset=0;
		}
		return this.fullResult.get(offset);
	}
	
	
}
